import { ref, onMounted } from 'vue'
import { getBannerAPI } from '@/apis/home'

export const useBanner = () => {
  const bannerImg = ref([])

  const getBannerImg = async () => {
    const { result: data } = await getBannerAPI({
      distributionSite: '2'
    })

    bannerImg.value = data
    // console.log(data)
  }

  onMounted(() => getBannerImg())

  return {
    bannerImg
  }
}
